package com.cn.bukeManage.service;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.ui.Model;
import org.springframework.web.multipart.MultipartFile;

import com.cn.bukeManage.pojo.AccessoriesType;
import com.cn.bukeManage.pojo.Activity;
import com.cn.bukeManage.pojo.Composition;
import com.cn.bukeManage.pojo.FinishProductType;
import com.cn.bukeManage.pojo.Location;
import com.cn.bukeManage.pojo.Picture;
import com.cn.bukeManage.pojo.Sample;
import com.cn.bukeManage.pojo.Sample_location;
import com.cn.bukeManage.pojo.Sample_style;
import com.cn.bukeManage.pojo.Style;
import com.cn.bukeManage.pojo.Territory;
import com.cn.bukeManage.pojo.page.SamplePage;
public interface ShoppingmallService {
	
	public List<SamplePage> getAllGoodsByPage(Model model,Integer currentPage,Integer state);
	public List<Activity> getAllActivityByPage(Model model,Integer currentPage);
	public List<Style> getAllStyleByPage(Model model, Integer currentPage);
	public List<Location> getAllLocationByPage(Model model, Integer currentPage);
	public List<Territory> getAllTerritoriesByPage(Model model, Integer currentPage);
	public List<Map<String, Object>> getAllType();
	public List<SamplePage> getAllGoodsByPageAndType(Model model, Integer currentPage, Integer type,Integer state);
	public Activity getActivityById(Integer activityId);
	public Integer updateActivity(Activity activity);
	public Integer addActivity(Activity activity);
	public Style getStyleById(Integer styleId);
	public Integer updateStyle(Style style);
	public Integer addStyle(Style style);
	public Location getLocationById(Integer locationId);
	public Integer updateLocation(Location location);
	public Integer addLocation(Location location);
	public Sample getSampleBySampleId(Map<String, Object> map,Model modelMap);
	//鍒犻櫎瀹夎浣嶇疆
	public Integer deleteLocation(Integer locationId);
	//鍒犻櫎椋庢牸
	public Integer deleteStyle(Integer styleId);
	//鍒犻櫎娲诲姩
	public Integer deleteActivity(Integer activityId);
	public String shangchuanTupian(MultipartFile fileList,HttpServletRequest request);
	//娣诲姞鏍峰搧
	public int insertSample(String str);
	//鑾峰彇鍏ㄩ儴椋庢牸
	public List<Style> getAllStyle();
	//鑾峰緱鍏ㄩ儴瀹夎浣嶇疆
	public List<Location> getAllLocation();
	//涓婁紶鍟嗗搧
	public String addgoods(String sample, String supplier,String properties, String compositions, String imgs,HttpServletRequest request)throws IOException;
	//查询商品
	public String select_serialnumber(String serialnumber);
	//鑾峰彇閰嶄欢绫诲瀷
	public List<AccessoriesType> getAllAccTyp();
	//鑾峰彇闈㈡枡
	public List<Composition> findCompositionBySampleId(Integer sampleId);
	//鏍规嵁鍟嗗搧Id鏌ヨ椋庢牸浣跨敤鏂瑰紡
	public List<Sample_style> getAllsample_stylebysampleId(Integer sampleId);
	//鏍规嵁鍟嗗搧Id鏌ヨ椋庢牸浣跨敤鏂瑰紡
	public List<Sample_location> getAllsample_locationsampleId(Integer sampleId);
	//鑾峰彇鎴愬搧甯樼被鍨�
	public List<FinishProductType> getAllFinType();
	//鏍规嵁浜у搧鍨嬪彿鏌ヨ鍟嗗搧
	public List<SamplePage> select_samplebyserialnumber(Model model, Integer serialnumber,Integer state);
	//根据id查询详情图
	public List<Picture> findPicBySampleId(Integer sampleId);
	//鏍规嵁id淇敼淇敼鍟嗗搧
	public String updateSample(String sample ,String supplier, String properties, String compositions, String assist, HttpServletRequest request)throws IOException;
	//通过商品Id查询商品信息
	public Sample selectSampleBySampleId(Integer SampleId);
	//通过id 修改商品状态 上架 下架
	public void updateGoodsByStateAndSampleId(Integer sampleId,Integer state);
	//查询所有商品分页信息
	public List<SamplePage> getGoodsByPage(Model model,Integer currentPage);
	//通过类型查询所有商品分页信息
	public List<SamplePage> getGoodsByPageAndType(Model model, Integer currentPage, Integer type);
	//
	public List<SamplePage> select_samplebyId(Model model, Integer serialnumber);
	//通过sampleId删除商品
	public void deleteGoods(Integer SampleId);
	//添加布料
	public void insert_compositions(String composition);
	//删除布料
	public void deleteCompositionByType(Integer sampleId,Integer type);
	
}
